// 用户模块

export default {
  namespaced: true,
  state() {
    // 用户信息
    return {
      profile: {
        id:'',
        avatar:'',
        nickname:'',
        account:'',// 用户名
        mobile:'',
        token:''
      },
      // 储存回调地址
      redirectUrl: '/'
    }
  },
  mutations: {
    // 修改用户信息,payload储存的是用户信息
    setUser (state,payload) {
      state.profile = payload
    },
    setRedirectUrl (state, url) {
      state.redirectUrl = url
    }
  }
}